//
//@author jltxseo
// Created by junlintianxia on 2018/7/26.
//

#include <GLES2/gl2.h>
#include "../TutorialLesson.h"

#ifndef LEARNOPENGLANDROIDPRO_TUTORIALLESSONTWO_H
#define LEARNOPENGLANDROIDPRO_TUTORIALLESSONTWO_H


class TutorialLessonTwo : public TutorialLesson {
public:
    TutorialLessonTwo();

    ~TutorialLessonTwo();

    virtual void create() override;

    virtual void change(int width, int height) override;

    virtual void draw() override;

private:
    //This triangle is red, green, and blue.
    // 表示3个顶点和颜色的向量的数组
    GLfloat triangle1VerticesData[21] = {
            // X, Y, Z,
            // R, G, B, A
            -0.5f, -0.25f, 0.0f,
            1.0f, 0.0f, 0.0f, 1.0f,

            0.5f, -0.25f, 0.0f,
            0.0f, 0.0f, 1.0f, 1.0f,

            0.0f, 0.559016994f, 0.0f,
            0.0f, 1.0f, 0.0f, 1.0f
    };

    Shader *mShader;
};


#endif //LEARNOPENGLANDROIDPRO_TUTORIALLESSONTWO_H
